Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve handling of .each calls and with tagged literals #814

Merged
merged 7 commits into from
Apr 26, 2021

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Apr 5, 2021

Implements the change described here, so that isDescribeCall and isTestCaseCall now return true for the outer CallExpression in .each()() calls, meaning matched nodes are now consistent as it'll always be the top-most one.

This has let us shed a bunch of edge-case code across our rules and utils, and also made it easy to refactor no-focused-tests so that it's 1/3rd smaller 🎉

Because of the mix of dependent and independent changes, I'm going to open this PR as a draft, and cherry pick some of the changes out into their own PRs.

Resolves #809
Resolves #810
Resolves #811

@G-Rath G-Rath added the each support Relates to supporting the `each` method label Apr 5, 2021
@G-Rath G-Rath force-pushed the refactor-each-handling branch from e6f22fd to ede986c Compare April 10, 2021 22:26
@G-Rath G-Rath force-pushed the refactor-each-handling branch from ede986c to dd4d720 Compare April 10, 2021 22:56
@G-Rath G-Rath changed the title Refactor each handling fix: improve handling of .each calls and with tagged literals Apr 11, 2021
@G-Rath G-Rath force-pushed the refactor-each-handling branch from b53917a to ac5872e Compare April 11, 2021 01:30
@G-Rath G-Rath marked this pull request as ready for review April 11, 2021 01:31
@G-Rath G-Rath merged commit 040c605 into main Apr 26, 2021
@G-Rath G-Rath deleted the refactor-each-handling branch April 26, 2021 00:10
github-actions bot pushed a commit that referenced this pull request Apr 26, 2021
## [24.3.6](v24.3.5...v24.3.6) (2021-04-26)

### Bug Fixes

* **no-conditional-expect:** check for expects in `catch`s on promises ([#819](#819)) ([1fee973](1fee973))
* **valid-expect:** support async `expect` in ternary statements ([#833](#833)) ([7b7a396](7b7a396))
* improve handling of `.each` calls and with tagged literals ([#814](#814)) ([040c605](040c605))
@github-actions
Copy link

🎉 This PR is included in version 24.3.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
each support Relates to supporting the `each` method released
Projects
None yet
1 participant